package com.hxgis.oc.config;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class CmaConfigInstance {
    @Getter
    @Value("${cma.api.baseUrl}")
    private String baseUrl;
    @Getter
    @Value("${cma.api.username}")
    private String musicUsername;
    @Getter
    @Value("${cma.api.password}")
    private String musicPassword;

    @Getter
    @Value("${cma.timer.swan}")
    private boolean swanEnable;

    @Getter
    @Value("${cma.timer.SurfEle}")
    private boolean surfEleEnable;

    @Getter
    @Value("${cma.timer.F2G}")
    private boolean F2GEnable;

    @Getter
    @Value("${cma.timer.radar}")
    private String[] radarStations;

    @Getter
    @Value("${cma.timer.keepDays}")
    private int keepDays;

    public boolean isRadarEnable()
    {
        return radarStations.length > 0;
    };
}
